<?php
Shadowsocks
=========================================

CentOS一键安装shadowsocks脚本:
https://www.jianshu.com/p/e2f0f6d1c790


wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

作者：dreamer_lk
链接：https://www.jianshu.com/p/e2f0f6d1c790
來源：简书
简书著作权归作者所有，任何形式的转载都请联系作者获得授权并注明出处。

Shadowsocks SS一键4合一安装包（SS搭建架设）
https://blog.upx8.com/2249
wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
卸载方法
./shadowsocks-all.sh uninstall

{
    "server":"0.0.0.0",
    "server_port":15137,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"123456789",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open":false
}






















~]# yum -y install gcc zlib zlib-devel openssl openssl-devel

./configure --prefix=/usr/local/shadowsocks

~]# vi /etc/profile.d/shadowsocks.sh
export PATH=/usr/local/shadowsocks/bin:$PATH

~]# . /etc/profile.d/shadowsocks.sh

前台运行服务端：
ss-server -s [yourip] -p [Server Port] -k [password] -m [encryption methods]
后台运行服务端：
nohup ss-server -s [Server IP] -p [Server Port] -k [Password] -m [encryption methods] &


注意，config.json需要自己创建，并且需要绝对路径

使用-c 指定配置文件， -f 创建守护进程：
vim config.json



# 注释版配置
{
    "server":"172.18.21.71",   # 服务器IP
    "server_port":1234,     # ss服务器所使用的端口号，建议改到30000-60000
    "password":"password",   # ss服务器密码，轻易不要分享
    "timeout":60,            # 超时时间，建议设置为60
    "method":"aes-256-cfb"         # 加密方式，需要和客户端配合设置
}

# 复制粘贴版

{
    "server":"123.57.10.93",
    "server_port":65432,
    "password":"mdx1626011288",
    "timeout":20,
    "method":"aes-256-cfb"
}


{
    "server":"123.57.10.93",
    "server_port":65432,
    "password":"mdx1626011288",
    "timeout":60,
    "method":"aes-256-cfb",
    "interface":"eth0",
}
000

ss-server -c /usr/local/shadowsocks/bin/config.json -f /tmp/ss.pid

[root@iZ25u0dr8znZ bin]# ps -aux | grep ss-server
root     31893  0.0  0.0  18036   964 ?        Ss   13:48   0:00 ss-server -c /usr/local/shadowsocks/bin/config.json -f /tmp/ss.pid
root     31896  0.0  0.0 112640   968 pts/4    S+   13:48   0:00 grep --color=auto ss-server
[root@iZ25u0dr8znZ bin]# 


kill -9 `cat /tmp/ss.pid`


[root@node1 bin]# ss -tnl
State       Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port 
LISTEN      0      128                                      172.18.21.71:65432                                              *:*     
[root@node1 bin]# 






squid 代理服务器


http://www.tuicool.com/articles/IJzeAv2

使用Privoxy将socks5代理转为http代理
https://blog.phpgao.com/privoxy-shadowsocks.html